<nz-card>

    <form nz-form
          (ngSubmit)="save()" #newsForm="ngForm">

        <!--标题-->
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label for="title" nz-form-item-required>新闻标题</label>
            </div>

            <div nz-col [nzSpan]="12" id="title">
                <nz-input [(ngModel)]="newsmoudle.title" required [nzPlaceHolder]="'标题'" name="title"></nz-input>
            </div>
        </div>


        <!--封面图-->
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label for="img" nz-form-item-required>封面图</label>
            </div>

            <div nz-col [nzSpan]="12" id="img">
                <app-myimgupload (responseUrl)="uploadimg($event)" #imgload></app-myimgupload>
                <nz-input [nzType]="'hidden'" [(ngModel)]="newsmoudle.cover" name="coverimg"></nz-input>
            </div>
        </div>

        <!--简介-->
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label for="subcontent" nz-form-item-required>
                    简介
                </label>
            </div>
            <div nz-col [nzSpan]="12" id="subcontent" nzHasFeedback>
                <nz-input
                    [nzType]="'textarea'"
                    [(ngModel)]="newsmoudle.subconent" required [nzPlaceHolder]="'简介'" name="sucontent"></nz-input>
            </div>
        </div>


        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label for="type" nz-form-item-required>
                    文章类型
                </label>
            </div>


            <div nz-col [nzSpan]="12" id="type">
                <nz-select [(ngModel)]="newsmoudle.type" name="type2">
                    <nz-option nzLabel="新闻资讯" [nzValue]='0'></nz-option>
                    <nz-option nzLabel="单篇文章" [nzValue]='1'></nz-option>
                </nz-select>
            </div>
        </div>


        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label for="content" nz-form-item-required>
                    内容
                </label>
            </div>

            <div nz-col [nzSpan]="12" id="content">
                <app-froala [froalaText]="newsmoudle.content" (froala)="froalaContent($event)"></app-froala>
            </div>
        </div>

        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <!--<label for="options" nz-form-item>操作</label>-->
            </div>
            <div nz-col [nzSpan]="12" id="options">
                <button nz-button [nzType]="'primary'" [disabled]="!newsForm.form.valid">提交</button>
                <!--<button nz-button [nzType]="'warning'"  (click)="newNews();newsForm.reset()" type="reset">取消</button>-->
            </div>
        </div>

    </form>
</nz-card>
